<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<?php echo @$css.@$js;?>		
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>	
<body>
<div id="addOrder" class="win_div" style="display:block;">
<div class="win_title">搜索相关文章<a href="javscript:;" onclick="parent.closeWin();" class="frame_close">[关闭] </a></div>
<div class="win_con">
	<table width="100%">
	<tr style="border-bottom:solid 1px #cccccc; height:20px;">
		<td >&nbsp;&nbsp;栏目：
			<select name="columns" id="columns">
			<option value="">请选择</option>
			<?php foreach ($columns as $key=>$value):?>
				<option value="<?php echo $value['id'];?>"><?php echo $value['cname'];?></option>
				<?php 
				if(@$value['child']){
					foreach ($value['child'] as $k=>$v):?>
					<option value="<?php echo $v['id']?>">|----<?php echo $v['cname']?></option>
					<?php endforeach;
				}?>	
				<?php endforeach;?>
			</select>
		&nbsp;&nbsp;标题：<input type="text" id="title" style="width:300px;"/> 
		&nbsp;&nbsp;<input type="button" value="搜 索" onclick="search_news()"/>
		&nbsp;&nbsp;<input type="button" value="设 置" onclick="finish_relation()"/> 选好后点击设置按钮
		</td>
	</tr>	
	</table>
	
</div>
<div class="main">
<div id="content" style="width:400px;float:left;height:333px;;">	

</div>		
	
<div id="content2"style="width:396px;position:absolute;right:0;  float:right;border-left:solid 4px #cccccc;height:331px;" >	

</div>

</div>
</div>
<input type="hidden" id="relationid" style="width:500px;">
</body>
<script language="Javascript">

function finish_relation(){
	parent.setRes($("#relationid").val());
	parent.closeWin();
}
function search_news()
{
	var columns = $("#columns").val();
	var title = $.trim($("#title").val());
	var url = '<?php echo MVC_WWW_HOST.'admin/api/relationrs'?>';
	$.get(url,{'title':title,'columns':columns},function(rs){
		$("#content").html(rs);
	})
}

</script>
</html>
